package com.t373.service.impl;

import com.t373.entity.Pet;
import org.springframework.stereotype.Service;

/**
 * @author Jane
 * @date 2024-12-16 11:49
 */
@Service("petService")
public class PetServiceImpl {

    public Pet getPetById(Integer petId){

        try {
            System.out.println("\t\t-service查询宠物的方法");
            int i = 1/0;
        }catch (Exception e){
            throw new RuntimeException("查询错误");
        }
        return new Pet();
    }

    public boolean add(Pet pet){
       // int i= 2/0;
        System.out.println("\t\t-service添加宠物的方法");
        return false;
    }

    public boolean update(Pet pet){
        System.out.println("\t\t-service修改宠物的方法");
        return true;
    }

    public boolean del(int id){
        System.out.println("\t\t-service删除宠物的方法");
        return true;
    }
}
